<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>设定画线用的画笔图像</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.imagescale.html">« imagescale</a></li>
      <li style="float: right;"><a href="function.imagesetclip.html">imagesetclip »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ref.image.html">GD 和图像处理 函数</a></li>
    <li>设定画线用的画笔图像</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="function.imagesetbrush" class="refentry">
   <div class="refnamediv">
    <h1 class="refname">imagesetbrush</h1>
    <p class="verinfo">(PHP 4 &gt;= 4.0.6, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">imagesetbrush</span> &mdash; <span class="dc-title">设定画线用的画笔图像</span></p>

   </div>
   <div class="refsect1 unknown-seealsp" id="refsect1-function.imagesetbrush-unknown-seealsp">
    <h3 class="title">说明</h3>
    <div class="methodsynopsis dc-description">
     <span class="methodname"><strong>imagesetbrush</strong></span>(<span class="methodparam"><span class="type">resource</span> <code class="parameter">$image</code></span>, <span class="methodparam"><span class="type">resource</span> <code class="parameter">$brush</code></span>): <span class="type">bool</span></div>

    <p class="para rdfs-comment">
     当用特殊的颜色 <code class="literal">IMG_COLOR_BRUSHED</code> 或
     <code class="literal">IMG_COLOR_STYLEDBRUSHED</code>
     绘画时，<span class="function"><strong>imagesetbrush()</strong></span>
     设定了所有画线的函数（例如 <span class="function"><a href="function.imageline.html" class="function">imageline()</a></span>
     和 <span class="function"><a href="function.imagepolygon.html" class="function">imagepolygon()</a></span>）所使用的画笔图像。【注：使用画笔图像，所画的线是由
     <code class="parameter">brush</code> 所代表的图像构成的。请参考并尝试运行
     <span class="function"><a href="function.imagesetstyle.html" class="function">imagesetstyle()</a></span> 中的例子以帮助理解。】
    </p>
    <blockquote class="note"><p><strong class="note">注意</strong>: 
     <p class="para">
      使用完画笔图像后不需要采取什么特殊动作。但如果销毁了画笔图像，在设定一个新的画笔图像之前不能使用
      <code class="literal">IMG_COLOR_BRUSHED</code> 或
      <code class="literal">IMG_COLOR_STYLEDBRUSHED</code>！
     </p>
    </p></blockquote>
    <blockquote class="note"><p><strong class="note">注意</strong>: 
     <p class="para">
      本函数是 PHP 4.0.6 添加的。
     </p>
    </p></blockquote>
   </div>

  </div></div></div></body></html>